package com.shark.app.persistent.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.shark.app.persistent.entity.TWmFinanceSysMenuEntity;

/**
 * Created by lenovo on 2016/8/11.
 */
@Repository
public interface TMenuRepository extends JpaRepository<TWmFinanceSysMenuEntity, Integer>, MenuDaoExtends{

	@Query("from TWmFinanceSysMenuEntity where id = :id")
	public TWmFinanceSysMenuEntity getById(@Param("id") int id);
	
	public TWmFinanceSysMenuEntity findById(int id);
	
	public List<TWmFinanceSysMenuEntity> findByIdNotAndIdInOrderByIdDesc(int id, int[] ids);
	
	public int countByIdNotAndIdIn(int id, int[] ids);
}
